package com.sunjob.mroresource.service.impl;

import com.sunjob.common.domain.resource.Accessory;
import com.sunjob.common.domain.resource.Inorout;
import com.sunjob.common.domain.resource.System;
import com.sunjob.common.domain.resource.Vehicletype;
import com.sunjob.common.util.MROUtils;
import com.sunjob.mroresource.mapper.AccessoryMapper;
import com.sunjob.mroresource.mapper.CommonMapper;
import com.sunjob.mroresource.service.CommonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author: TomHuang
 * @date: 2022/8/23 0:24
 */
@Service
public class CommonServiceImpl implements CommonService {

    @Autowired
    private CommonMapper commonMapper;

    @Autowired
    private AccessoryMapper accessoryMapper;

    @Override
    public List<String> selectAllVehicletype() {
        return commonMapper.queryAllVehicletype();
    }

    @Override
    public int selectAllVehicletypeCount() {
        return commonMapper.queryAllVehicletypeCount();
    }

    @Override
    public int insertVehicletype(Vehicletype vehicletype) {
        vehicletype.setVehicletypeId(MROUtils.nextId());
        return commonMapper.insertVehicletype(vehicletype);
    }

    @Override
    public int updateVehicletype(Vehicletype vehicletype) {
        return commonMapper.updateVehicletype(vehicletype);
    }

    @Override
    public int deleteVehicletype(Long vehicletypeId) {
        return commonMapper.deleteVehicletype(vehicletypeId);
    }

    @Override
    public List<String> selectAllSystem() {
        return commonMapper.queryAllSystem();
    }

    @Override
    public int selectAllSystemCount() {
        return commonMapper.queryAllSystemCount();
    }

    @Override
    public int insertSystem(System system) {
        return commonMapper.insertSystem(system);
    }

    @Override
    public int updateSystem(System system) {
        return commonMapper.updateSystem(system);
    }

    @Override
    public int deleteSystem(Long systemId) {
        return commonMapper.deleteSystem(systemId);
    }

    @Override
    public int selectAllInoroutCount() {
        return commonMapper.queryAllInoroutCount();
    }

    @Override
    public int selectAllInoroutInCount() {
        return commonMapper.queryAllInoroutInCount();
    }

    @Override
    public int selectAllInoroutOutCount() {
        return commonMapper.queryAllInoroutOutCount();
    }




}
